package com.jy.records.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jy.common.annotation.Excel;
import com.jy.common.core.domain.BaseEntity;

/**
 * 图书借阅管理对象 borrow_records
 * 
 * @author ruoyi
 * @date 2025-05-29
 */
public class BorrowRecords extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 借阅记录唯一标识，自增主键 */
    private Long recordId;

    /** 借阅用户ID，关联users表的user_id */
    @Excel(name = "借阅用户ID，关联users表的user_id")
    private Long userId;

    /** 借阅图书ID，关联books表的book_id */
    @Excel(name = "借阅图书ID，关联books表的book_id")
    private Long bookId;

    /** 图书借阅日期和时间，记录借阅操作发生时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "图书借阅日期和时间，记录借阅操作发生时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date borrowDate;

    /** 图书归还日期和时间，NULL表示尚未归还 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "图书归还日期和时间，NULL表示尚未归还", width = 30, dateFormat = "yyyy-MM-dd")
    private Date returnDate;

    /** 是否为当前借阅：0-历史记录，1-当前借阅 */
    @Excel(name = "是否为当前借阅：0-历史记录，1-当前借阅")
    private Long isCurrent;

    public void setRecordId(Long recordId) 
    {
        this.recordId = recordId;
    }

    public Long getRecordId() 
    {
        return recordId;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setBookId(Long bookId) 
    {
        this.bookId = bookId;
    }

    public Long getBookId() 
    {
        return bookId;
    }

    public void setBorrowDate(Date borrowDate) 
    {
        this.borrowDate = borrowDate;
    }

    public Date getBorrowDate() 
    {
        return borrowDate;
    }

    public void setReturnDate(Date returnDate) 
    {
        this.returnDate = returnDate;
    }

    public Date getReturnDate() 
    {
        return returnDate;
    }

    public void setIsCurrent(Long isCurrent) 
    {
        this.isCurrent = isCurrent;
    }

    public Long getIsCurrent() 
    {
        return isCurrent;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("recordId", getRecordId())
            .append("userId", getUserId())
            .append("bookId", getBookId())
            .append("borrowDate", getBorrowDate())
            .append("returnDate", getReturnDate())
            .append("isCurrent", getIsCurrent())
            .toString();
    }
}
